var app = getApp();
var uril = require('../../../utils/util')
    //Page Object
Page({
    data: {
        systemInfo: app.systemInfo,
        list: [
            { 'name': '体验会员', 'info': '1元 / 3天', 'price': '1' },
            { 'name': '月会员', 'info': '20元 / 30天', 'price': '20' },
            { 'name': '季度会员', 'info': '50元 / 90天', 'price': '50' },
            { 'name': '年会员', 'info': '180元 / 365天', 'price': '180' },
        ],
        user: null
    },
    getList() {
        let _self = this
        let data = {
            openId: app.openId
        }
        uril.postRequest('FinanceManage/rest/memberLevelList.do', data, function(res) {

            console.log(res)
            _self.setData({
                list: res.memberLevelList
            })
        })
    },
    gotopay: function(e) {
        console.log(e.currentTarget.dataset.value)
    },
    //options(Object)
    onLoad: function(options) {
        this.setData({
            user: app.userInfo
        })
        this.getList()
    },
    onReady: function() {

    },
    onShow: function() {

    },
    onHide: function() {

    },
    onUnload: function() {

    },
    onPullDownRefresh: function() {

    },
    onReachBottom: function() {

    },
    onShareAppMessage: function() {

    },
    onPageScroll: function() {

    },
    //item(index,pagePath,text)
    onTabItemTap: function(item) {

    }
});